import 'package:flutter_app/interface/mvp.dart';

/// 主持人基类
/// 泛型 V 视图泛型
/// 泛型 M 模型泛型
abstract class BasePresenter<V extends IView, M extends IModel>
    implements IPresenter<V> {
  /// 视图类
  V view;

  /// 模型类
  M model;

  /// 构造方法设置 Model
  BasePresenter(IModel model) {
    this.model = model;
  }

  @override
  void attchView(IView view) {
    this.view = view;
  }

  @override
  void detachView() {
    this.view = null;
  }
}
